﻿using System;
using Semantics.Base;
namespace SilverlightParser.Web.Backend
{
    class SilverConvertor
    {
        public static Semantics.Silverlight.LanguageNode ConvertLanguageNode(LangNode srclangnode)
        {
            Semantics.Silverlight.LanguageNode silverlangnode = new Semantics.Silverlight.LanguageNode(srclangnode.Value);
            for (int i = 0; i < srclangnode.Children.Count; i++)
            {
                silverlangnode.Children.Add(ConvertLanguageNode(srclangnode.Children[i]));
            }
            silverlangnode.SN = srclangnode.SN;
            silverlangnode.PositionKey = srclangnode.Position.Key;
            return silverlangnode;
        }
    }
}